<template>
    <div class="appIntroduction">
        <div class="banner">
            <h2 class="title">Your key to the ultimate intimate experience</h2>
            <p class="desc">The Matelink app brings all your preferences and settings together in one place for
                effortless control.</p>
        </div>
        <div class="download">
            <p class="title">Matelink app</p>
            <img src="@/assets/images/app_download_pic1.svg" alt="app_download" class="download1" />
            <img src="@/assets/images/app_download_pic2.svg" alt="app_download" class="download2" />
        </div>
        <div class="custom">
            <h2 class="title">Customize your toy control with Matelink <span>AI</span></h2>
            <p class="desc">Connect your toy to the Matelink app via Bluetooth for advanced control. Once linked, let AI
                fully control your toy's movements as you wish.</p>
        </div>
        <div class="companion">
            <h2 class="title">The super-intelligent AI chatbot can be the partner who truly gets you</h2>
            <div class="container">
                <div class="item">
                    <div class="cont">
                        <h3 class="margin1">Swipe to match and chat</h3>
                        <p>Thousands of roles await you to explore, connect, and chat, including those you are familiar
                            with in the movie, anime, and more.</p>
                    </div>
                    <img src="@/assets/images/app_companion_pic1.png" alt="app_companion" />
                </div>
                <div class="item">
                    <img src="@/assets/images/app_companion_pic2.png" alt="app_companion" />
                    <div class="cont">
                        <h3 class="margin2">Create your dream roles</h3>
                        <p>Customize the look and personality of the character however you desire.</p>
                    </div>
                </div>
                <div class="item">
                    <div class="cont">
                        <h3 class="margin3">Train your companions</h3>
                        <p class="last">The more you communicate with them in various forms, the better they will
                            understand your
                            preferences, fantasies, and fetishes, ultimately delivering your toy's most personalized and
                            satisfying experiences.</p>
                    </div>
                    <img src="@/assets/images/app_companion_pic3.png" alt="app_companion" />
                </div>
            </div>
        </div>
        <div class="messaging">
            <h2 class="title">Chat just like you do in your messaging apps</h2>
            <p class="desc">Any form of message is available for you to make the connection with your partner.</p>
            <div class="label">
                <p>Text</p>
                <p>Image</p>
                <p>Voice message</p>
                <p>Voice call</p>
            </div>
        </div>
        <div class="swiper">
            <el-carousel :autoplay="false" arrow="always" indicator-position="none">
                <el-carousel-item v-for="(item, i) in swiperList" :key="i">
                    <div class="itemBox">
                        <div class="details">
                            <h2 class="title">{{ item.title }}</h2>
                            <p class="desc">{{ item.desc }}</p>
                        </div>
                        <img :src="item.pic" class="swiperPic">
                    </div>
                </el-carousel-item>
            </el-carousel>
        </div>
        <div class="recommended">
            <h2 class="title">Recommended toys with APP</h2>
            <div class="toys" v-if="!isMobile">
                <div class="item" v-for="(item, i) in toysList" :key="i">
                    <img :src="item.pic" alt="toys" class="toys_pic" />
                    <div class="cont">
                        <h3>{{ item.name }}</h3>
                        <p>{{ item.description }}</p>
                        <p class="price">
                            <span>${{ item.price }}</span>
                            <span class="originalPrice">${{ item.originalPrice }}</span>
                        </p>
                    </div>
                    <div class="btns">
                        <p><img src="@/assets/images/app_toy_icon.svg" /></p>
                        <p class="buy">Buy Now</p>
                    </div>
                </div>
            </div>

            <el-carousel :autoplay="false" arrow="always" indicator-position="none" v-else>
                <el-carousel-item v-for="(item, i) in toysList" :key="i">
                    <div class="item">
                        <img :src="item.pic" alt="toys" class="toys_pic" />
                        <div class="cont">
                            <h3>{{ item.name }}</h3>
                            <p>{{ item.description }}</p>
                            <p class="price">
                                <span>${{ item.price }}</span>
                                <span class="originalPrice">${{ item.originalPrice }}</span>
                            </p>
                        </div>
                        <div class="btns">
                            <p><img src="@/assets/images/app_toy_icon.svg" /></p>
                            <p class="buy">Buy Now</p>
                        </div>
                    </div>
                </el-carousel-item>
            </el-carousel>
        </div>
    </div>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue';
const app = getCurrentInstance();
const isMobile = app?.appContext.config.globalProperties.$isMobile;
import swiperPic1 from '@/assets/images/app_swiper_pic1.png';
import swiperPic2 from '@/assets/images/app_swiper_pic2.png';
import swiperPic3 from '@/assets/images/app_swiper_pic3.png';
import swiperPic4 from '@/assets/images/app_swiper_pic4.png';
import toysPic from '@/assets/images/app_toys_pic.png';
const swiperList = ref([
    {
        id: 1,
        pic: swiperPic1,
        title: 'Text to connect',
        desc: `Share your thoughts and desires with them — they understand your every message, which creates a connection that's uniquely yours.`
    },
    {
        id: 2,
        pic: swiperPic2,
        title: 'Share the moment with pictures',
        desc: `Send photos of any kind to convey your feelings or start a discussion. AI recognition technology enables them to interpret your messages. `
    },
    {
        id: 3,
        pic: swiperPic3,
        title: 'Make the call or answer theirs',
        desc: `Directly contact and converse with them in real-time through voice calls. Speak your desires and hear them as if they're right beside you. Let their sexy voice guide you to the place.`
    },
    {
        id: 4,
        pic: swiperPic4,
        title: 'Voice your emotions',
        desc: `Hold to talk when texting feels tiring. Each voice message brings you closer.`
    }
]);
const toysList = ref([
    {
        id: 1,
        pic: toysPic,
        name: 'xxx',
        description: 'AI-powered automatic thrusting male stroker',
        price: 199,
        originalPrice: 299
    },
    {
        id: 2,
        pic: toysPic,
        name: 'xxx',
        description: 'AI-powered automatic thrusting male stroker',
        price: 199,
        originalPrice: 299
    },
    {
        id: 3,
        pic: toysPic,
        name: 'xxx',
        description: 'AI-powered automatic thrusting male stroker',
        price: 199,
        originalPrice: 299
    }
]);
</script>
<style lang="scss" scoped>
.appIntroduction {
    .banner {
        width: 100%;
        height: 800px;
        background: url('~@/assets/images/app_banner.png') no-repeat;
        background-size: cover;
        text-align: center;
        overflow: hidden;
        color: #fff;

        .title {
            font-size: 64px;
            font-weight: 700;
            margin-top: 550px;
        }

        .desc {
            font-size: 36px;
            font-weight: 400;
            line-height: 44px;
            width: 1280px;
            margin: 0 auto;
        }
    }

    .download {
        height: 100px;
        background: #000;
        display: flex;
        padding: 0 190px;
        align-items: center;
        justify-content: space-between;
        color: #fff;

        .title {
            font-size: 48px;
            font-weight: 700;
            line-height: 60px;
        }

        img {
            cursor: pointer;
        }

        .download1 {
            margin-left: auto;
        }
    }

    .custom {
        background: url('~@/assets/images/app_custom_bg.jpg') no-repeat;
        height: 800px;
        margin-top: 15px;
        overflow: hidden;
        padding-left: 360px;

        .title {
            width: 460px;
            font-size: 60px;
            font-weight: 700;
            line-height: 73px;
            color: #fff;
            margin-top: 172px;

            span {
                background: linear-gradient(281.5deg, #F447E3 22.44%, #7737F5 32.69%);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
            }
        }

        .desc {
            font-size: 24px;
            font-weight: 400;
            line-height: 36px;
            color: rgba(255, 255, 255, 0.8);
            width: 576px;
            margin-top: 35px;
        }
    }

    .companion {
        .title {
            font-size: 60px;
            font-weight: 700;
            line-height: 74px;
            text-align: center;
            width: 1154px;
            margin: 125px auto 85px;
        }

        .container {
            padding: 0 175px;

            .item {
                display: flex;
                justify-content: space-between;

                .cont {
                    width: 710px;

                    h3 {
                        font-size: 48px;
                        font-weight: 700;
                        line-height: 81px;

                    }

                    p {
                        font-size: 24px;
                        font-weight: 400;
                        line-height: 36px;
                        color: rgba(0, 0, 0, 0.8);
                        width: 560px;

                    }

                    .last {
                        width: 640px;
                    }

                    .margin1 {
                        margin-top: 58px;
                    }

                    .margin2 {
                        margin-top: 163px;
                    }

                    .margin3 {
                        margin-top: 140px;
                    }
                }

                img {
                    width: 776px;
                }
            }
        }
    }

    .messaging {
        margin-top: 70px;

        .title {
            font-size: 60px;
            font-weight: 700;
            line-height: 140px;
            text-align: center;
        }

        .desc {
            font-size: 32px;
            font-weight: 400;
            line-height: 1;
            text-align: center;
            color: rgba(0, 0, 0, 0.8);
        }

        .label {
            display: flex;
            justify-content: space-around;
            width: 1080px;
            margin: 60px auto 90px;

            p {
                font-size: 36px;
                font-weight: 600;
                line-height: 44px;
            }
        }
    }

    .swiper {

        padding: 0 170px;

        :deep(.el-carousel) {
            .el-carousel__container {
                height: 494px;
            }

            .el-carousel__item {
                display: flex;
                justify-content: space-between;
            }

            .el-carousel__arrow {
                bottom: 30px;
                top: auto;
                width: 40px;
                height: 40px;
                border: 2px solid #000;
                background: none;
                color: #000;
                font-size: 30px;
            }

            .el-carousel__arrow--right {
                left: 70px;
            }

            .el-carousel__arrow--left {
                left: 0;
            }
        }

        .itemBox {
            display: flex;

            .cardPic {
                width: 776px;
            }

            .details {
                margin-right: 140px;

                .title {
                    font-size: 48px;
                    font-weight: 700;
                    line-height: 80px;
                    margin-bottom: 30px;
                    margin-top: 20px;
                }

                .desc {
                    font-size: 24px;
                    font-weight: 400;
                    line-height: 36px;

                }
            }
        }
    }

    .recommended {
        margin: 145px 170px 72px;

        .title {
            font-size: 60px;
            font-weight: 700;
            line-height: 73px;
            text-align: center;
        }

        .toys {
            display: flex;
            justify-content: space-between;
            margin-top: 72px;

            .item {
                width: 496px;
                height: 690px;
                background: url('~@/assets/images/app_toys_bg.png') no-repeat;
                padding: 0 41px;
                overflow: hidden;

                .toys_pic {
                    width: 348px;
                    height: 348px;
                    margin: 50px auto 0;
                    display: block;
                }

                .cont {
                    margin-top: 15px;
                    color: #fff;

                    h3 {
                        font-size: 30px;
                        font-weight: 600;
                        line-height: 36px;
                    }

                    p {
                        font-size: 20px;
                        font-weight: 400;
                        line-height: 26px;
                        margin-top: 10px;
                    }

                    .price {
                        font-size: 24px;
                        font-weight: 600;
                        line-height: 30px;
                        margin-top: 24px;

                        .originalPrice {
                            text-decoration: line-through;
                            margin-left: 10px;
                            color: rgba(255, 255, 255, 0.5);
                            font-size: 20px;
                        }
                    }
                }

                .btns {
                    display: flex;
                    justify-content: space-between;
                    margin-top: 24px;

                    p {
                        cursor: pointer;
                        width: 65px;
                        height: 65px;
                        border-radius: 11px;
                        border: 2px solid rgba(255, 255, 255, 0.2);

                        img {
                            display: block;
                            margin: 14px auto;
                        }
                    }

                    .buy {
                        width: 318px;
                        height: 65px;
                        border: 2px solid rgba(255, 255, 255, 0.2);
                        font-size: 22px;
                        font-weight: 600;
                        line-height: 30px;
                        color: #fff;
                        text-align: center;
                        line-height: 61px;
                    }
                }
            }
        }
    }
}

@media screen and (max-width: 750px) {

    .appIntroduction {
        .banner {
            height: 12rem;
            background: url('~@/assets/images/app_banner_m.png') no-repeat;
            background-size: cover;

            .title {
                font-size: 0.48rem;
                margin-top: 1.8rem;
            }

            .desc {
                font-size: 0.32rem;
                line-height: 0.38rem;
                width: 6rem;
                margin-top: 0.3rem;
            }
        }

        .download {
            height: auto;
            padding: 0.5rem 1.3rem;
            flex-wrap: wrap;

            .title {
                font-size: 0.48rem;
                line-height: 0.6rem;
                text-align: center;
                width: 100%;
                margin-bottom: 0.1rem;
            }

            img {
                width: 2.4rem;
            }
        }

        .custom {
            background: url('~@/assets/images/app_custom_bg_m.png') no-repeat;
            background-size: cover;
            height: 9.56rem;
            margin-top: 0.2rem;
            overflow: hidden;
            padding-left: 0;

            .title {
                width: 6.2rem;
                font-size: 0.48rem;
                line-height: 0.6rem;
                margin: 0.84rem auto 0;
            }

            .desc {
                font-size: 0.32rem;
                line-height: 0.38rem;
                width: 6rem;
                margin: 0.3rem auto 0;
            }
        }

        .companion {
            padding: 0 0.45rem;

            .title {
                font-size: 0.48rem;
                line-height: 0.6rem;
                text-align: center;
                width: 100%;
                margin: 0.8rem auto 0.4rem;
            }

            .container {
                padding: 0;

                .item {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    flex-wrap: wrap;

                    .cont {
                        width: 100%;
                        order: 2;

                        h3 {
                            font-size: 0.32rem;
                            line-height: 0.8rem;
                            padding: 0 0.35rem;

                        }

                        p {
                            font-size: 0.28rem;
                            line-height: 0.4rem;
                            width: 100%;
                            padding: 0 0.35rem;

                        }

                        .last {
                            width: 100%;
                            padding: 0 0.35rem;
                        }

                        .margin1 {
                            margin-top: 0.2rem;
                        }

                        .margin2 {
                            margin-top: 0.2rem;
                        }

                        .margin3 {
                            margin-top: 0.2rem;
                        }
                    }

                    img {
                        width: 100%;
                        margin-top: 0.4rem;
                    }
                }
            }
        }

        .messaging {
            margin-top: 0.7rem;
            padding: 0 0.8rem;

            .title {
                font-size: 0.48rem;
                line-height: 0.6rem;
                text-align: left;
            }

            .desc {
                font-size: 0.28rem;
                line-height: 0.4rem;
                text-align: left;
                margin-top: 0.2rem;
            }

            .label {
                display: flex;
                width: 100%;
                margin: 0.3rem auto 0.5rem;
                flex-wrap: wrap;

                p {
                    width: 50%;
                    font-size: 0.36rem;
                    line-height: 0.8rem;
                    text-align: center;
                }
            }
        }

        .swiper {

            padding: 0;

            :deep(.el-carousel) {
                .el-carousel__container {
                    height: 9rem;
                }

                .el-carousel__arrow {
                    bottom: auto;
                    top: 5rem;
                    border: 2px solid #fff;
                    color: #fff;
                }

                .el-carousel__arrow--right {
                    right: 0;
                    left: auto;
                }

                .el-carousel__arrow--left {
                    left: 0;
                }
            }

            .itemBox {
                display: flex;
                flex-wrap: wrap;

                .swiperPic {
                    width: 100%;
                }

                .details {
                    margin-right: 0;
                    width: 100%;
                    order: 2;
                    padding: 0 0.3rem;

                    .title {
                        font-size: 0.32rem;
                        line-height: 0.78rem;
                        margin-bottom: 0;
                        margin-top: 0.32rem;
                    }

                    .desc {
                        font-size: 0.28rem;
                        line-height: 0.4rem;

                    }
                }
            }
        }

        .recommended {
            margin: 0.6rem 0 0;

            .title {
                font-size: 0.48rem;
                line-height: 0.8rem;
            }

            :deep(.el-carousel) {
                .el-carousel__container {
                    height: 10.4rem;
                }

                .el-carousel__arrow {
                    bottom: auto;
                    top: 5rem;
                    background: #fff;
                    color: #000;
                    font-size: 0.3rem;
                }

                .el-carousel__arrow--right {
                    right: 0.2rem;
                    left: auto;
                }

                .el-carousel__arrow--left {
                    left: 0.2rem;
                }

                .item {
                    width: 100%;
                    height: 100%;
                    background: url('~@/assets/images/app_toys_bg.png') no-repeat;
                    padding: 0 0.6rem;
                    overflow: hidden;

                    .toys_pic {
                        width: 5.26rem;
                        height: 5.26rem;
                        margin: 0.75rem auto 0.2rem;
                        display: block;
                    }

                    .cont {
                        color: #fff;

                        h3 {
                            font-size: 0.36rem;
                            line-height: 0.54rem;
                        }

                        p {
                            font-size: 0.28rem;
                            line-height: 0.4rem;
                            margin-top: 0.14rem;
                        }

                        .price {
                            font-size: 0.36rem;
                            font-weight: 600;
                            line-height: 0.44rem;
                            margin-top: 0.36rem;

                            .originalPrice {
                                text-decoration: line-through;
                                margin-left: 0.34rem;
                                color: rgba(255, 255, 255, 0.5);
                                font-size: 0.28rem;
                            }
                        }
                    }

                    .btns {
                        display: flex;
                        justify-content: space-between;
                        margin-top: 0.36rem;

                        p {
                            cursor: pointer;
                            width: 1rem;
                            height: 1rem;
                            border-radius: 0.12rem;
                            border: 2px solid rgba(255, 255, 255, 0.2);

                            img {
                                display: block;
                                margin: 0.2rem auto;
                            }
                        }

                        .buy {
                            width: 4.8rem;
                            height: 1rem;
                            border: 2px solid rgba(255, 255, 255, 0.2);
                            font-size: 0.32rem;
                            font-weight: 600;
                            line-height: 0.9rem;
                            color: #fff;
                            text-align: center;
                        }
                    }
                }
            }
        }
    }
}
</style>